Optimal. Leaf size=55 \[ -\frac {(a+b) \log (1-\sin (c+d x))}{2 d}-\frac {(a-b) \log (1+\sin (c+d x))}{2 d}-\frac {b \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {2800, 788, 647,
31} \begin {gather*} -\frac {(a+b) \log (1-\sin (c+d x))}{2 d}-\frac {(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac {b \sin (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 647
Rule 788
Rule 2800
Rubi steps
\begin {align*} \int (a+b \sin (c+d x)) \tan (c+d x) \, dx &=\frac {\text {Subst}\left (\int \frac {x (a+x)}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b \sin (c+d x)}{d}-\frac {\text {Subst}\left (\int \frac {-b^2-a x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b \sin (c+d x)}{d}+\frac {(a-b) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac {(a+b) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac {(a+b) \log (1-\sin (c+d x))}{2 d}-\frac {(a-b) \log (1+\sin (c+d x))}{2 d}-\frac {b \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 38, normalized size = 0.69 \begin {gather*} \frac {b \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d}-\frac {b \sin (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 41, normalized size = 0.75
method | result | size |
derivativedivides | \(\frac {-a \ln \left (\cos \left (d x +c \right )\right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(41\) |
default | \(\frac {-a \ln \left (\cos \left (d x +c \right )\right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(41\) |
risch | \(i a x +\frac {i b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a c}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{d}\) | \(122\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 43, normalized size = 0.78 \begin {gather*} -\frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a + b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 2 \, b \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 45, normalized size = 0.82 \begin {gather*} -\frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a + b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \tan {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1456 vs.
\(2 (51) = 102\).
time = 7.52, size = 1456, normalized size = 26.47 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.64, size = 74, normalized size = 1.35 \begin {gather*} \frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-b\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+b\right )}{d}-\frac {b\,\sin \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________